package com.business.lgh.naco.console.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lgh
 * @version V1.0
 * @Package com.business.lgh.naco.console.controller
 * @date 2020/6/22 5:37 下午
 */
@RestController
@RequestMapping({"/v1/auth", "/v1/auth/users"})
public class UserController {

    @PostMapping("/login")
    public String login(){
        //TODO 添加登录功能
        String result="{\n" +
                "    \"accessToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYWNvcyIsImV4cCI6MTU5Mjg0MDQwNH0.mvd35cKmaPKmJS5J65YxqcVJs0a49eW6K6Cp5p9Zqtc\",\n" +
                "    \"tokenTtl\": 18000,\n" +
                "    \"globalAdmin\": true\n" +
                "}";

        return result;
    }
}
